import {request} from "../request"


export function getUserInfo(){
  return request({
    url:'/api/web_user/detail/' + window.sessionStorage.getItem('userID'),
    method:'GET',
  })
}
//获取验证码
export function getCode(params){
 return  request({
   url:'/api/email/email_captcha',
   method:'POST',
   params
 })
}
//检查新邮箱是否注册
export function checkNewEmail(email){
  return request({
    url:'/api/web_user/email_is_exists/' + email ,
    method:'GET'
  })
}
//检查验证码
export function check_captcha(datas){
  return request({
    url:'/api/email/check' ,
    method:'POST',
    data:JSON.stringify(datas)
  })
}
//提交新的用户信息
export function saveChange(datas){
  // datas.webUserId = window.sessionStorage.getItem('userID')
  return request({
    url:'/api/web_user/update/' + window.sessionStorage.getItem('userID'),
    method:'PUT',
    data:JSON.stringify(datas)
  })
}

